﻿/*
-----------------------------------------------------------------------------------
<copyright file="ErrorResponse.js" company="Microsoft Corporation">
         (c) © 2016 Microsoft. All rights reserved.
    
</copyright>
---------------------------------------------------------------------------------
*/

function securityResponse(result) {
    addErrorAccordionElement("div", "p", "errorMessage", "errorHelp", result.StdErr,
                result.RunErrInfo, "0", "-1", "contentExtend");
    document.getElementById("consoleHeader").innerHTML = ("Console - Invalid request");
    accordionify();
}

function serverTimeout(result) {
    addErrorAccordionElement("div", "p", "errorMessage", "errorHelp", "Stopped running your code",
                result.StdErr, "0", "-1", "contentExtend");
    document.getElementById("consoleHeader").innerHTML = ("Console - Server timeout");
}

function serverError(result) {
    addErrorAccordionElement("div", "p", "errorMessage", "errorHelp", result.StdErr,
                "There was a problem in the server", "0", "-1", "contentExtend");
    document.getElementById("consoleHeader").innerHTML = ("Console - Server error");
}